<?php
//echo $scriptmce;
?>
<div class="span10">
          <div class="row-fluid">
            <div class="span12 box">
                <div class="box-head">
                    <h3><i class="icon-white icon-file"></i> Add Article</h3>
                </div>
                <div class="box-content">
                 <div class="content-inner">
                   <?php echo form_error('judul', '<div class="alert alert-info"><button type="button" class="close" data-dismiss="alert"><i class="icon-fullscreen"></i></button>', '</div>'); ?>
                   <?php echo form_error('deskripsi', '<div class="alert alert-info"><button type="button" class="close" data-dismiss="alert"><i class="icon-fullscreen"></i></button>', '</div>'); ?>
                   <?php echo form_error('divisi', '<div class="alert alert-info"><button type="button" class="close" data-dismiss="alert"><i class="icon-fullscreen"></i></button>', '</div>'); ?>
                
                    
                    <!--Latitude : <input type="text" name="lati" class="gllpLatitude" value="-7.787534"/> -->
                    <!--Longitude : <input type="text" name="longi" class="gllpLongitude" value="110.368258"/> -->
                    
                    <form class="form-horizontal" method="post" action="<?php echo base_url();?>admin/materi/update" enctype="multipart/form-data">
                    <?php foreach($data as $d): ?>
                    <input type="hidden" name="id_materi" value="<?php echo $d['id_materi'];?>">
                    <input type="hidden" name="filelama" value="<?php echo $d['nama_file'];?>">
                           <div class="control-group">
	      						<label class="control-label">Judul Materi</label>
                                <div class="controls">
                           				<input type="text" placeholder="Judul Berita" name="judul" value="<?php echo $d['judul'];?>" class="input-xxlarge"> 
                                </div>
                          </div>
                           
                           <div class="control-group">
	      						<label class="control-label">Deskripsi</label>
                                <div class="controls well">
                           			<textarea id="textarea" rows="5" class="span12" name="deskripsi"><?php echo $d['deskripsi'];?></textarea>
                           		</div>
                           </div>
                           
                           <div class="control-group">
                           		<label class="control-label">Divisi</label><label></label>
                                	<div class="controls">
                                           <span>
                                               <select name="divisi" class="combobox"><option value="<?php echo $d['id_divisi'];?>"><?php echo $d['divisi'];?></option>
                                               <?php foreach($divisi as $u): ?>
                                                <option value="<?php echo $u['id_divisi'];?>"><?php echo $u['divisi'];?></option>
                                               <?php endforeach; ?>
                                               </select>
                                           </span>
                                     </div>
                                 </div>
                            <div class="control-group">
								<label class="control-label" for="input12">File</label>
								<div class="controls">
								<p class="text-info"><?php echo $d['nama_file'];?></p>
            		    		</div>
							</div>
                           
                           <div class="control-group">
								<label class="control-label" for="input12">Ganti File</label>
								<div class="controls">
								<input type="file" name="userfile" class="filestyle" data-buttonText=""><p class="muted">Allowed file type upload (.pdf, .zip, .rar, .doc) .</p>
            		    		</div>
							</div>
                            
                            <div class="control-group">
	      						<label class="control-label">&nbsp;</label>
                                <div class="controls">
                           			<input type="submit" class="btn btn-primary" value="Simpan" />
                                    <input type="reset" class="btn btn-danger" value="Reset" />
                           		</div>
                           </div>
                                <!--<button type="submit" class="btn btn-primary" onClick="ste.submit();">Publish &#43;</button> -->
                           <?php endforeach;?>
                        </form>
                
              </div>
            </div>
          </div> <!-- end row -->
          
        </div>
</div>